package com.gszy.auth.entity;

import com.gszy.auth.security.UserDetails;
import com.gszy.auth.utils.StringUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Users implements UserDetails {

    private String id;
    private String email;
    private String username;
    private String password;
    private String phoneNum;
    private Integer status;
    private List<Permission> permissions;

    @Override
    public List<Permission> getAuthorities() {
        return permissions;
    }
}
